home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 21
/
Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso
/
Aminet
/
comm
/
mail
/
YamBookToMD2.lha
/
YamBookToMD2.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1997-07-25
|
2KB
|
93 lines
/* Transfering YAM addressbook to MicroDotII */
/* $VER: YamBookToMD2 1.0 (23.07.97) © By Patrick Wullaert.
Email : <patw@glo.be> URL: http://titan.glo.be/patw/index.html */
/* Thanks to John Pullicino for testing ! :) */
/* You need RexxReqTools.library in your LIBS: dir for this to work properly ! */
/* This script can be used from either the shell (type 'rx <scriptpath>/yambooktoMD2.rexx) */
/* or from within YAM (copy the script to the rexx drawer of the YAM dir and add this line */
/* to the '.config' file : */
/* RexxMenu0 = YAM:Rexx/YamBooktoMD2.rexx (where 0 is the menu item number) */
/* YAM is © By Marcel Beck. MD2 is © By Oliver Wagner */
/* RexxReqTools.library is © By Rafael D'Halleweyn */
/* User definable paths start here : */
yampath='sdh0:Mailers/YAM/'
mdpath='sdh0:newsreaders/MicroDotII/'
/* Mind the trailing slashes !! */
/* User definable paths end here */
options results
addlib('rexxreqtools.library',0,-30,0)
if show('P',YAM) then do
address YAM
INFO screen
pubscreen=result
end
errorlin=""
if ~open(yambook,yampath''.addressbook'',READ) then do
errorlin='Wrong YAM path !'
end
if ~open(mdbook,mdpath''MicroDot.Addressbook'',WRITE) then do
errorlin=errorlin' Wrong MD2 path !'
end
if errorlin~=="" then do
errorlin=errorlin||'0A'x||'Please re-specify !'
rtezrequest(errorlin,,,'rt_pubscrname='||pubscreen)
exit
end
writeln(mdbook,'MicroDot - Bookmarks.mcc')
close(mdbook)
open(mdbook,mdpath''MicroDot.Addressbook'',APPEND)
readln(yambook)
do until eof(yambook)
lijn=readln(yambook)
if pos('@GROUP',lijn)>0 then do
grp=substr(lijn,8)
writeln(mdbook,'»'||grp)
end
if pos('@USER',lijn)>0 then do
adres=readln(yambook)
user=readln(yambook)
writeln(mdbook,user'|'adres)
end
if pos('@ENDGROUP',lijn)>0 then do
writeln(mdbook,'«')
end
end
close(mdbook)
close(yambook)
rtezrequest('Your YAM addresses have been'||'0a'x||'copied to the MD2 addressbook !',,,'rt_pubscrname='||pubscreen)
exit